package cn.lml.lession.user.service.impl;

import java.util.List;
import java.util.Map;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.lml.lession.user.dao.ModuleRoleMapper;
import cn.lml.lession.user.model.ModuleRole;
import cn.lml.lession.user.service.ModuleRoleService;

@Service
public class ModuleRoleServiceImpl implements ModuleRoleService{

	private static final Logger logger=LoggerFactory.getLogger(ModuleRoleServiceImpl.class);	
	@Autowired
	private ModuleRoleMapper moduleRoleMapper;

	@Override
	public Integer insertModuleRole (ModuleRole moduleRole){
		logger.debug("新增数据 "+moduleRole);
		return moduleRoleMapper.insertModuleRole(moduleRole);
	}

	@Override
	public Integer deleteByRid (Integer rid){
		logger.debug("通过Rid删除数据 "+rid);
		return moduleRoleMapper.deleteByRid(rid);
	}

	@Override
	public Integer updateByRid (ModuleRole moduleRole){
		logger.debug("通过Rid修改数据 "+moduleRole);
		return moduleRoleMapper.updateByRid(moduleRole);
	}

	@Override
	public ModuleRole selectByRid (Integer rid){
		logger.debug("通过Rid查找数据 "+rid);
		return moduleRoleMapper.selectByRid(rid);
	}

	@Override
	public List<ModuleRole> queryModuleRole(Map<String, Object> cond) {
		logger.debug("分页查询数据 "+cond);
		return moduleRoleMapper.queryModuleRole(cond);
	}

	@Override
	public Integer countModuleRole(Map<String, Object> cond) {
		logger.debug("统计数据 "+cond);
		return moduleRoleMapper.countModuleRole(cond);
	}

}